package wang.Exception;

public class Try {
    public static void main(String[] args) {int[] arr={1,22,54,5456,112,3};
        try {
            System.out.println(10/0);
            System.out.println(arr[10]);
        }catch (ArithmeticException a){
            String message = a.getMessage();
            System.out.println(message);
            String string = a.toString();
            System.out.println(string);
            a.printStackTrace();
        }catch (ArrayIndexOutOfBoundsException e){
           e.printStackTrace();
        }

    }
}
